package cn.yqx.bankshop.goods.service.impl;

import cn.yqx.bankshop.goods.dao.BuActivityCenterMapper;
import cn.yqx.bankshop.goods.pojo.BuActivityCenter;
import cn.yqx.bankshop.goods.pojo.BuActivityCenterExample;
import cn.yqx.bankshop.goods.service.ActivityCenterService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityCenterServiceImpl implements ActivityCenterService {
    private static  final  int IS_ENABLED = 1 ;
    @Autowired
    BuActivityCenterMapper mapper ;

    @Override
    public List<BuActivityCenter> findActivitys() {
        BuActivityCenterExample example = new BuActivityCenterExample() ;
        example.or().andIsEnabledEqualTo(IS_ENABLED) ;
        example.setOrderByClause("`order_by` desc ");
        return mapper.selectByExample(example);
    }
}
